<template>
    <div class="detail-table">
        <div class="detail-table">
            <i class="el-icon-s-grid">
                <span>工序采集数据</span>
            </i>
        </div>
        <mes-table style="padding: 0px 10px 10px;" ref="grid" :columns="columns" :max-height="270" :index="true"
            :tableData="rows" :pagination-hide="true">
        </mes-table>
    </div>
</template>

<script>
import MesTable from "@/components/basic/VolTable";
export default {
    components: { MesTable },
    data() {
        return {
            columns: [{ field: 'processlist_id', title: '主键Id', type: 'int', width: 110, hidden: true, readonly: true, require: true, align: 'left' },
            { field: 'process_id', title: '工序', type: 'int', bind: { key: 'process', data: [] }, width: 110, align: 'left', sort: true },
            { field: 'datapointtype', title: '类型', type: 'string', bind: { key: 'datapointtype', data: [] }, width: 220, align: 'left' },
            { field: 'datapointname', title: '名称', type: 'string', width: 220, align: 'left' },
            { field: 'CreateID', title: '创建人编号', type: 'int', width: 100, hidden: true, align: 'left' },
            { field: 'Creator', title: '创建人', type: 'string', width: 100, align: 'left' },
            { field: 'CreateDate', title: '创建时间', type: 'datetime', width: 150, align: 'left', sort: true },
            { field: 'Modifier', title: '更新人', type: 'string', width: 100, align: 'left' },
            { field: 'ModifyDate', title: '更新时间', type: 'datetime', width: 150, align: 'left', sort: true },
            { field: 'ModifyID', title: '更新人编号', type: 'int', width: 100, hidden: true, align: 'left' }],
            rows: []
        };
    },
    methods: {
        rowClick(row) {
            let url = "/api/base_process/getDetailRows?process_id=" + row.process_id
            this.http.get(url, {}, true).then(rows => {
                this.rows = rows;
            })
        }
    }
}
</script>
<style lang="less" scoped>
.detail-table {
    padding: 0px 4px;
    border-top: 10px solid rgb(238, 238, 238);

    h3 {
        font-weight: 500;
        padding-left: 10px;
        background: #fff;
        margin-top: 8px;
        padding-bottom: 5px;
    }
}

.detail-title {
    padding: 10px;
    font-size: 15px;
    color: '#313131';
    font-weight: bold;

}
</style>
